package cn.david.org.service.impl;


import cn.david.basic.service.impl.BasicServiceImpl;
import cn.david.basic.util.PageList;
import cn.david.org.domain.DictionaryTypeDetail;
import cn.david.org.mapper.DictionaryTypeDetailMapper;
import cn.david.org.query.DictionaryTypeDetailQuery;
import cn.david.org.service.IDictionaryTypeDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(readOnly = true,propagation = Propagation.SUPPORTS)
public class DictionaryTypeDetailServiceImpl extends BasicServiceImpl<DictionaryTypeDetail> implements IDictionaryTypeDetailService{
    @Autowired
    DictionaryTypeDetailMapper dictionaryTypeDetailMapper;

    @Override
    public void deleteByIds(Long[] ids) {
        dictionaryTypeDetailMapper.deleteByIds(ids);

    }

    @Override
    public PageList<DictionaryTypeDetail> getQueryData(DictionaryTypeDetailQuery query) {
        return new PageList<DictionaryTypeDetail>(dictionaryTypeDetailMapper.queryCount(query),dictionaryTypeDetailMapper.queryData(query));
    }

    @Override
    public void delByTypesId(Long id) {
        dictionaryTypeDetailMapper.delByTypesId(id);

    }
}
